home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d13 / pctv2n2.arc / TESTPATH.PAS < prev    next >
Pascal/Delphi Source File  |  1991-08-11  |  367b  |  23 lines

  1. PROGRAM TestPath;
  2.  
  3. USES
  4.    DOS, CRT;
  5.  
  6. VAR
  7.    PathToTest : PathStr;
  8.    F : FILE;
  9.  
  10. BEGIN
  11.    PathToTest := 'C:\DOS\';
  12.    ASSIGN(F,PathToTest+'NUL');
  13.    {$I-}
  14.    RESET(F);
  15.    {$I+}
  16.    IF IOResult <> 0 THEN
  17.       WRITELN('Path '+PathToTest+' does not exist.')
  18.    ELSE BEGIN
  19.       CLOSE(F);
  20.       WRITELN('Path '+PathToTest+' exists.');
  21.    END;
  22. END.
  23.